/*
package com.xyazm.order.mq.config;


import com.xyazm.common.constants.RocketMqConstant;
import com.xyazm.common.enums.RocketMqTopicEnum;
import com.xyazm.order.mq.consumer.*;
import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
import org.apache.rocketmq.client.exception.MQClientException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

*/
/**
 * 消费者配置
 * @author xuyou
 * @date: 2022/6/6 9:54
 *//*

@Configuration
public class ConsumerConfig {

    @Autowired
    private RocketMQProperties rocketMQProperties;


    */
/**
     * 支付订单超时延迟消息消费者
     * @author xuyou
     * @date: 2022/6/6 9:55
     * @param: payOrderTimeoutListener
     * @return: org.apache.rocketmq.client.consumer.DefaultMQPushConsumer
     *//*

    @Bean("payOrderTimeoutConsumer")
    public DefaultMQPushConsumer payOrderTimeoutConsumer(PayOrderTimeoutListener payOrderTimeoutListener)
            throws MQClientException {
        DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(RocketMqTopicEnum.PAY_ORDER_TIMEOUT_DELAY.getConsumerGroup());
        consumer.setNamesrvAddr(rocketMQProperties.getNameServer());
        consumer.subscribe(RocketMqTopicEnum.PAY_ORDER_TIMEOUT_DELAY.getTopic(), "*");
        consumer.registerMessageListener(payOrderTimeoutListener);
        consumer.start();
        return consumer;
    }

    */
/**
     * 订单完成支付消息消费者
     * @author xuyou
     * @date: 2022/6/23 18:19
     * @param: paidOrderSuccessListener
     * @return: org.apache.rocketmq.client.consumer.DefaultMQPushConsumer
     *//*

    @Bean("paidOrderSuccessConsumer")
    public DefaultMQPushConsumer paidOrderSuccessConsumer(PaidOrderSuccessListener paidOrderSuccessListener)
            throws MQClientException {
        DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(RocketMqTopicEnum.PAID_ORDER_SUCCESS.getConsumerGroup());
        consumer.setNamesrvAddr(rocketMQProperties.getNameServer());
        consumer.subscribe(RocketMqTopicEnum.PAID_ORDER_SUCCESS.getTopic(), "*");
        consumer.registerMessageListener(paidOrderSuccessListener);
        consumer.start();
        return consumer;
    }

    */
/**
     * 取消订单释放资产消费者 2
     * @author xuyou
     * @date: 2022/6/30 16:35
     * @param: releaseAssetsListener
     * @return: org.apache.rocketmq.client.consumer.DefaultMQPushConsumer
     *//*

    @Bean("releaseAssetsConsumer")
    public DefaultMQPushConsumer releaseAssetsConsumer(ReleaseAssetsListener releaseAssetsListener)
            throws MQClientException {
        DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(RocketMqTopicEnum.RELEASE_ASSETS.getConsumerGroup());
        consumer.setNamesrvAddr(rocketMQProperties.getNameServer());
        consumer.subscribe(RocketMqTopicEnum.RELEASE_ASSETS.getTopic(), "*");
        consumer.registerMessageListener(releaseAssetsListener);
        consumer.start();
        return consumer;
    }


    */
/**
     * 退款前置请求 消费者 2
     * @author xuyou
     * @date: 2022/7/1 10:11
     * @param: refundRequestLinstener
     * @return: org.apache.rocketmq.client.consumer.DefaultMQPushConsumer
     *//*

    @Bean("cancelRefundConsumer")
    public DefaultMQPushConsumer cancelRefundConsumer(CancelRefundListener cancelRefundListener)
            throws MQClientException {
        DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(RocketMqTopicEnum.CANCEL_REFUND.getConsumerGroup());
        consumer.setNamesrvAddr(rocketMQProperties.getNameServer());
        consumer.subscribe(RocketMqTopicEnum.CANCEL_REFUND.getTopic(), "*");
        consumer.registerMessageListener(cancelRefundListener);
        consumer.start();
        return consumer;
    }

    */
/**
     * 真正退款处理 消费者
     * @author xuyou
     * @date: 2022/7/1 16:21
     * @param: actualRefundListener
     * @return: org.apache.rocketmq.client.consumer.DefaultMQPushConsumer
     *//*

    @Bean("actualRefundConsumer")
    public DefaultMQPushConsumer actualRefundConsumer(ActualRefundListener actualRefundListener)
            throws MQClientException {
        DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(RocketMqTopicEnum.ACTUAL_REFUND.getConsumerGroup());
        consumer.setNamesrvAddr(rocketMQProperties.getNameServer());
        consumer.subscribe(RocketMqTopicEnum.ACTUAL_REFUND.getTopic(), "*");
        consumer.registerMessageListener(actualRefundListener);
        consumer.start();
        return consumer;
    }

    */
/**
     * 客服审核退款通过释放用户资产消费者 2
     * @author xuyou
     * 2022/7/30 0030 14:49
    *//*

    @Bean("auditAcceptReleaseAssetsConsumer")
    public DefaultMQPushConsumer auditPassReleaseAssetsConsumer(AuditAcceptReleaseAssetsListener auditAcceptReleaseAssetsListener)
            throws MQClientException {
        DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(RocketMqTopicEnum.CUSTOMER_AUDIT_ACCEPT_RELEASE_ASSETS_TOPIC.getConsumerGroup());
        consumer.setNamesrvAddr(rocketMQProperties.getNameServer());
        consumer.subscribe(RocketMqTopicEnum.CUSTOMER_AUDIT_ACCEPT_RELEASE_ASSETS_TOPIC.getTopic(), "*");
        consumer.registerMessageListener(auditAcceptReleaseAssetsListener);
        consumer.start();
        return consumer;
    }


}
*/
